{% extends 'base.html' %}

{% block content %}
    <h1>{% block title %} 欢迎来看麦叔的博客 {% endblock %}</h1>
    {% for post in posts %}
    <a href="{{url_for('post', post_id=post['id'])}}">
        <h2>{{ post['title'] }}</h2>
    </a>
    <span class="badge badge-primary">{{ post['created'] }}</span>
    <a href="{{ url_for('edit', id=post['id']) }}">
        <span class="badge badge-warning">编辑</span>
    </a>
    <hr>
    {% endfor %}
{% endblock %}